(function ($){

	$.toast_min = function (){
        var id = new Date().getTime() + Math.round(Math.random()*10) + Math.round(Math.random()*10);

        var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
        if (typeof options === 'number') {
            options = {
                duration: options
            };
        }
        if (typeof options === 'function') {
            options = {
                callback: options
            };
        }

        options = $.extend({
            content: content,
            duration: 3000,
        }, options);

        $('body').append('<div id='+id+'><div class="my_toast_min"'
                          +'style="position: absolute;top:230px;left:0;right:0;margin:0 auto;z-index: 5000;width:50%;height: 0.3rem;line-height: 0.3rem;background: rgba(17, 17, 17, 0.7);'
                          +'text-align: center;border-radius: 5px;color: #FFFFFF;padding:0rem 0.1rem;">'+options.content+'</div></div>');
        var $el = $('#'+id);
        var $toast = $el.find('.my_toast_min');
        $toast.addClass('weui-animate-fade-in');
        setTimeout(function () {
            $toast.addClass('weui-animate-fade-out').on('animationend webkitAnimationEnd', function () {
                $el.remove();
                return;
            });
        }, options.duration);

        return;
    }
})($);